package com.tian.mapper;

import com.tian.entity.UserCouponExpireTemporary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface UserCouponExpireTemporaryMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserCouponExpireTemporary record);

    UserCouponExpireTemporary selectByPrimaryKey(Long id);

    UserCouponExpireTemporary selectByUserCouponId(Long userCouponId);

    List<UserCouponExpireTemporary> selectAll();

    List<UserCouponExpireTemporary> selectByExpireDate(Date expireDate);

    List<UserCouponExpireTemporary> selectByExpireDatePage(@Param("expireDate") Date expireDate, @Param("start") long start, @Param("pageSize") int pageSize);
    List<UserCouponExpireTemporary> selectByPromptPage(@Param("expireDate") Date expireDate, @Param("start") long start, @Param("pageSize") int pageSize);

    long countByExpireDate(Date expireDate);
    long countByPrompt(Date expireDate);

    int updateByPrimaryKey(UserCouponExpireTemporary record);

    int doExpire(Long id);

    int doPrompt(Long id);
}